home *** CD-ROM | disk | FTP | other *** search
/ Colorado Rockies 2000 / Colorado Rockies 2000 by US West.iso / mac / xtras / Beatnik Xtra Lite / Beatnik Behaviors LiteD7.cst / 00003_Script_Transposer Lite Behavior < prev    next >
Text File  |  1998-10-22  |  5KB  |  125 lines

  1. -- Transposer Lite, a Beatnik Behavior
  2. -- by Paul Sebastien, pauls@sirius.com, http://www.bitstream.net/psykosonik
  3.  
  4. -- The 'Pro' version of this behavior will feature such additions as intelligent key-based transposition. For more info, go to http://www.headspace.com/
  5.  
  6.  
  7.  
  8. global beatnik
  9.  
  10.  
  11.  
  12.  
  13.  
  14. property pWhichEvent
  15. property pTransposeAmount
  16.  
  17.  
  18. on getPropertyDescriptionList
  19.   
  20.   --  initialize the Beatnik Xtra instance
  21.   
  22.   
  23.   --  instantiation script (below) is commented out, as it is not necessary to instantiate a new instance, since we are just transposing an existing one named 'beatnik'. Please make sure that the instance that you want to transpose is named 'beatnik', otherwise you should change the instance name in this script to match the instance name that you want to transpose.
  24.   
  25.   --  put "------------------------------"
  26.   --  if ilk(beatnik) = #instance then stop(beatnik)
  27.   --  set beatnik = VOID
  28.   --  set beatnik = new(xtra "beatnik",TRUE)
  29.   --  set bankFileName = the moviePath & "patches.hsb"
  30.   --  put "beatnik =" && beatnik
  31.   --  put "Bank =" && bankFileName
  32.   --  put "SetSampleLibrary(beatnik) = " & setsampleLibrary(beatnik, bankFileName)
  33.   --  put "SetReady(beatnik) = " & setReady(beatnik)
  34.   --  put "isReady(beatnik) = " & isReady(beatnik)
  35.   --  if not(isReady(beatnik)) then
  36.   --    alert "The Beatnik Xtra did not initialize, the Beatnik soundbank file 'patches.hsb' must be in the same folder as your current Director movie is in (or modify the path in the script). Also, make sure that the Xtra (BEATNIK.X32) is added to this movie."
  37.   --    exit
  38.   --  end if
  39.   --  --  finished initializing the Beatnik Xtra instance
  40.   
  41.   
  42.   
  43.   
  44.   
  45.   
  46.   
  47.   
  48.   
  49.   set d = [:]
  50.   
  51.   
  52.   addProp d, #pWhichEvent, [#default: "mouseDown", #format: #symbol, #range: [#mouseDown, #mouseUp, #mouseEnter, #mouseLeave, #mouseWithin,#enterFrame,#exitFrame], #comment: "Choose a trigger event:"]
  53.   addProp d, #pTransposeAmount, [#default: 0, #format: #integer, #range: [-12,-11,-10, -9, -8, -7, -6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12], #comment: "Amount to transpose by:"]
  54.   
  55.   return d
  56. end
  57.  
  58.  
  59.  
  60. on doIt me
  61.   global beatnik
  62.   setTranspose(beatnik, pTransposeAmount)
  63.   
  64.   
  65. end
  66.  
  67.  
  68.  
  69. on mouseDown me
  70.   if the pWhichEvent of me = #mouseDown then doIt me
  71.   
  72. end
  73.  
  74.  
  75. on mouseUp me
  76.   if the pWhichEvent of me = #mouseUp then doIt me
  77.   
  78.   
  79.   
  80. end
  81.  
  82.  
  83. on mouseEnter me
  84.   if the pWhichEvent of me = #mouseEnter then doIt me
  85.   
  86. end
  87.  
  88.  
  89. on mouseLeave me
  90.   if the pWhichEvent of me = #mouseLeave then doIt me
  91.   
  92. end
  93.  
  94. on mouseWithin me
  95.   if the pWhichEvent of me = #mouseWithin then doIt me
  96.   
  97. end
  98.  
  99. on enterFrame me
  100.   if the pWhichEvent of me = #enterFrame then doIt me
  101.   
  102. end
  103.  
  104. on exitFrame me
  105.   if the pWhichEvent of me = #exitFrame then doIt me
  106.   
  107. end
  108.  
  109. on stopMovie
  110.   global beatnik
  111.   stop(beatnik)
  112.   closeBeatnik(beatnik)
  113.   set beatnik=VOID
  114.  
  115. end stopMovie
  116.  
  117.  
  118. on getBehaviorDescription
  119.   
  120.   
  121.   set description = "TRANSPOSER LITE BEHAVIOR" && RETURN & "by Paul Sebastien pauls@sirius.com" && RETURN && RETURN & "This Beatnik Behavior allows you to transpose (change the key of) an RMF file or Groovoid playing through a Beatnik Xtra instance named 'beatnik'. You can edit this behavior's script to choose a different instance name if necessary, or specify multiple instances to transpose multiple files simultaneously." && RETURN && RETURN & "PARAMETERS:" && RETURN && RETURN & "ò Amount to transpose by:" && RETURN & "...Lets you specify the amount to tranpose the Beatnik Xtra instance by." && RETURN && RETURN & "ò Choose a trigger event:" && RETURN & "...Lets you choose which Director event you want to trigger the transposition." && RETURN && RETURN & "IMPORTANT:" && RETURN &&RETURN & "- This behavior requires that the Beatnik Xtra Lite is properly added to your Director project, and also, the Beatnik soundbank (patches.hsb) must be in the same directory as your Director project file, otherwise you should change the path to the soundbank in this behavior's script if the soundbank resides elsewhere." && RETURN && RETURN & "- If you want to use this behavior to transpose multiple files/instances simultaneously, you should modify the Beatnik instance name used in this behavior's script so it is unique for each instance. Currently, the instance name used is 'beatnik', so if you want to tranpose multiple instances or instances named something other than 'beatnik', you can modify the name in the script to 'beatnik2' and so on, as needed, to create multiple separate instances that can be tranposed." && RETURN &&RETURN & "For more information on instantiating the Beatnik Xtra Lite, refer to the documentation or other Beatnik Xtra sample movies." && RETURN && RETURN & "To upgrade to Beatnik Behaviors Pro, or for more information on Beatnik-related products and music files, visit the Headspace web site at:" && RETURN && RETURN & "http://www.headspace.com"
  122.   
  123.   return description
  124. end
  125.